package lab02.test06;
//属性尺寸
public class Triangle{
        Triangle(){}
        double sideA;
        double sideB;
        double sideC;
        double perimter;
        double area;
        boolean x;
        //行为：周长，面积。

        void trangle(double sideA,double sideB,double sideC){
            if (sideA+sideB>sideC) x=true;
            else x=false;
        }
        double Perimter() {
            if (x = true)
                return sideA + sideB + sideC;
            else {
                System.out.println("不能构成三角形");
                return 0;
            }
        }
        double alter(double a,double b,double c) {
            sideC = c;
            sideB = b;
            sideA = a;
            return 0;
        }
    }


